package org.siam.impl.data.formatters {
	
	import mx.core.IFactory;
	import mx.formatters.Formatter;
	
	import org.siam.core.data.formatters.IFormatterContext;
	import org.siam.impl.data.DataContext;
	
	public class FormatterContext extends DataContext implements IFormatterContext {
		
		private var _ifNull:String;
		private var _ifEmpty:String;
		
		private var _formatter:Formatter;
		
		public function FormatterContext(factory:IFactory, ifNull:String, ifEmpty:String) {
			super(factory);

			_ifNull = ifNull;
			_ifEmpty = ifEmpty;
			
			_formatter = factory.newInstance();
		}
		
		public function get ifNull():String {
			return _ifNull;
		}
		
		public function get ifEmpty():String {
			return _ifEmpty;
		}
		
		internal function get formatter():Formatter {
			return _formatter;
		}
	}
}